import request from '@/utils/request'

// 查询商品资质信息列表
export function listCollectProductQualifications(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/list',
    method: 'get',
    params: query
  })
}

// 查询商品资质信息详细
export function getCollectProductQualifications(id) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/' + id,
    method: 'get'
  })
}

// 新增商品资质信息
export function addCollectProductQualifications(data) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/maintainQualificationProgram',
    method: 'post',
    data: data
  })
}

// 根据类目id获取需要填写的资质信息
export function selectQuailficationByCategoryId(data) {
  return request({
    url: '/gather/gather/collectProductCategoryQualification/selectQualificationByCategoryId',
    method: 'get',
    params: data
  })
}

// 删除商品资质信息
export function delCollectProductQualifications(id) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/' + id,
    method: 'delete'
  })
}

// 绑定有证书资质的商品
export function bindingQualifications(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/bindingQualifications',
    method: 'get',
    params: query
  })
}

// 解绑有证书资质的商品
export function unBindingQualifications(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/unBindingQualifications',
    method: 'get',
    params: query
  })
}

// 查询已绑定资质的商品信息列表
export function selectCollectList(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/selectCollectList',
    method: 'get',
    params: query
  })
}

// 同步资质信息
export function synchronizationProgram(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgram/synchronizationProgram',
    method: 'get',
    params: query
  })
}

// 查看定时任务执行情况
export function queryTimedTask(query) {
  return request({
    url: '/gather/gather/collectProductQualificationProgramTask/list',
    method: 'get',
    params: query
  })
}
